<template>
    <div class="consultation-information-table-content">
        <div style="background: #fff;z-index: 99;padding-top: 10px;">
            <div style="display: flex;justify-content: center;margin: 10px 0 0 0;text-align: center;">
                <h2 style="color: #5ca3e5 !important;font-size: 30px;font-weight: 600;">xx食品药品审评查验中心<br/>现场咨询预约</h2>
            </div>
        </div>
        <!-- <div style="margin-top: 117px;"></div> -->
        <div class="inspector-information-bottom-v">
            <div class="inspector-registration-first-step" v-if="!stepNum">
                <div class="inspector-table-from-d table-from-d-car">
                    <!-- <div class="inspector-table-text table-text-car">
                        <span class="table-text-s">申请人手机号<span class="inspector-asterisk-v first-asterisk-v">*</span></span>
                        <span>：</span>
                    </div> -->
                    <div class="right-content-f" style="border-bottom: 1px solid #CCC;">
                        <a-form ref="form" :form="form">
                            <a-form-item >
                                <a-input
                                style="width: 100%;border:none;outline:0"
                                @change="phoneChange"
                                v-model:value="firstStepData.fsj"
                                v-decorator="['fsj',{ initialValue:firstStepData.fsj, rules: rules.fsj}]"
                                placeholder="请输入您的手机号码"
                                />
                            </a-form-item>
                        </a-form>
                    </div>
                </div>
                <div class="inspector-table-from-d table-from-d-car">
                    <!-- <div class="inspector-table-text table-text-car">
                        <span class="table-text-s"><span class="inspector-asterisk-v first-asterisk-v">*</span>验证码</span>
                        <span>：</span>
                    </div> -->
                    <div class="right-content-f" style="border-bottom: 1px solid #CCC;">
                        <a-form ref="form" :form="form">
                            <a-form-item >
                                <a-input
                                style="width: 64%;border:none;outline:0"
                                v-model:value="firstStepData.fyzm"
                                v-decorator="['fyzm',{ initialValue:firstStepData.fyzm, rules: rules.fyzm}]"
                                placeholder="验证码"
                                />
                                <a-button
                                    class="inspector-table-code-btn-box"
                                    size="small"
                                    :type="!totalSeconds?'primary':''"
                                    :loading="loading"
                                    @click.stop.prevent="getCode(hourString,minuteString,secondString)"
                                    :disabled="isGetCode">
                                    <span class="code-text" v-if="!totalSeconds">{{codeText}}</span>
                                    <span class="code-text" v-if="hourString == '00' && minuteString == '00' && secondString == '00' && totalSeconds && !isGetCode ">重新获取</span>
                                    <span class="code-text text-color" v-if="hourString !== '00'">{{hourString+'：'+minuteString+'：'+secondString}}S</span>
                                    <span class="code-text text-color" v-else-if="minuteString !== '00'">{{minuteString+'：'+secondString}}S</span>
                                    <span class="code-text text-color" v-else-if="secondString !== '00'">{{secondString}}S 后重新发送</span>
                                </a-button>
                            </a-form-item>
                        </a-form>
                        <!-- <a-input style="width: 100%;" v-model:value="fsfzh" placeholder="请输入身份证号码" /> -->
                    </div>
                </div>
                <!-- <div class="inspector-table-from-d table-from-d-car">
                    <div class="inspector-table-text table-text-car">
                        <span class="table-text-s">验证码<span class="inspector-asterisk-v first-asterisk-v">*</span></span>
                        <span>：</span>
                    </div>
                    <div class="right-content-v" >
                        <a-form ref="form" :form="form">
                            <a-form-item >
                                <a-input-search
                                style="width: 100%;"
                                size="large"
                                @change="phoneChange"
                                v-model:value="firstStepData.fyzm"
                                v-decorator="['fyzm',{ initialValue:firstStepData.fyzm, rules: rules.fyzm}]"
                                placeholder="验证码"
                                >
                                  <a-button slot="enterButton" @click="getCode" v-bind:class="{grey:isGrey,blue:!isGrey}" v-bind:disabled="dis" class="blue-btn">
                                    <span v-if="show">发送</span>
                                    <span v-else>{{count}}S后重新发送</span>
                                  </a-button>
                                </a-input-search>
                            </a-form-item>
                        </a-form>
                    </div>
                </div> -->
                <div v-if="isCode" style="display: flex;justify-content: center;margin-top: 30px;">
                    <a-button class="blue-btn" @click="nextStep" style="width: 70%; height: 38px !important;font-size: 18px;border-radius: 5px;" >
                      下一步
                    </a-button>
                </div>
            </div>
            <div class="inspector-registration-second-step" v-if="stepNum == 2 && formField.ftjzt == '0'">
                <div style="margin: 0 10px 10px 10px;">
                    <a-button style="margin-right: 10px;" class="blue-btn" @click="backclick">返回手机号码认证</a-button>
                    <a-button class="blue-btn" v-if="formField.ftjzt == '0'" @click="refreshTable(formField.id,1)">刷新登记表</a-button>
                    <!-- <a v-if="formField.ftjzt !== '0'" @click="exportClick">点击下载登记表</a> -->
                </div>
                <div>
                    <div class="inspector-table-from-d" id="fsqqymc">
                        <!-- 需要校验 -->
                        <div class="inspector-table-text">
                            <span class="table-text-s">申请企业名称<span class="inspector-asterisk-v">*</span></span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <a-input v-if="formField.ftjzt == '0'" style="width: 100%;" v-model:value="formField.fsqqymc" placeholder="请输入申请企业名称" />
                            <span v-else>{{ formField.fsqqymc }}</span>
                        </div>
                    </div>
                    <div class="inspector-table-from-d" id="fzxlxr">
                        <div class="inspector-table-text">
                            <span class="table-text-s">咨询联系人<span class="inspector-asterisk-v">*</span></span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <a-input v-if="formField.ftjzt == '0'" style="width: 100%;" v-model:value="formField.fzxlxr" placeholder="请输入咨询联系人姓名" />
                            <span v-else>{{ formField.fzxlxr }}</span>
                        </div>

                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fzxlxr'"><span class="tips-text-v">请输入咨询联系人姓名</span></div>
                    <div class="inspector-table-from-d" id="fsj">
                        <!-- 需要校验 -->
                        <div class="inspector-table-text">
                            <span class="table-text-s">手机号码<span class="inspector-asterisk-v">*</span></span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <span>{{ formField.fsj }}</span>
                        </div>
                    </div>
                    <div class="inspector-table-from-d" id="fyyrq">
                        <div class="inspector-table-text">
                            <span class="table-text-s">预约日期<span class="inspector-asterisk-v">*</span></span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <a-select
                                style="width: 100%;"
                                v-if="formField.ftjzt == '0'"
                                v-model="formField.fyyrq"
                                :defaultValue="formField.fyyrq"
                                placeholder="请选择预约日期">
                                <a-select-option v-for="(item,index) in rqList" :value="item" :key="index">
                                    {{ item }}
                                </a-select-option>
                            </a-select>
                            <span v-else>{{ formField.fyyrq }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fyyrq'"><span class="tips-text-v">请选择预约日期</span></div>
                    <div class="inspector-table-from-d" id="fjhlfrs">
                        <div class="inspector-table-text">
                            <span class="table-text-s">计划来访人数<span class="inspector-asterisk-v">*</span></span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <a-input-number v-if="formField.ftjzt == '0'" style="width: 100%;" v-model:value="formField.fjhlfrs" :min="1" placeholder="请输入计划来访人数" />
                            <span v-else>{{ formField.fjhlfrs }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fjhlfrs'"><span class="tips-text-v">请输入计划来访人数</span></div>
                    <div class="inspector-table-from-d" id="fzzmm" style="align-items: flex-start;display: block;">
                        <div class="inspector-table-text">
                            <span class="table-text-s" style="width: 154px;">选择咨询事项类别<span class="inspector-asterisk-v">*</span></span>
                            <span>：</span>
                        </div>
                        <div class="right-content-v">
                            <div v-if="formField.ftjzt == '0'">
                                <div v-for="(item,index) in typeList" :key="index" class="typeCheck-div">
                                    <div style="background-color: aliceblue;border-radius: 5px;text-align: center;">
                                        <!-- <a-checkbox :checked="item.fj.fxzzt == '0'?false:true" @change="fxzztChange($event,item.fj.id,item.fj.fxzzt)">
                                            {{ item.fj.fmc}}
                                        </a-checkbox> -->
                                        <span>{{ item.fj.fmc}}</span>
                                    </div>
                                    <a-checkbox
                                        v-for="(items,indexs) in item.zjList"
                                        :key="indexs"
                                        :checked="items.fxzzt == '0'?false:true"
                                        @change="fxzztChange($event,items.id,items.fxzzt)">
                                        {{ items.fmc}}
                                    </a-checkbox>
                                </div>
                            </div>
                            <span v-else>{{ formField.fzzmm }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fzzmm'"><span class="tips-text-v">请选择咨询事项类别</span></div>
                    <div class="inspector-table-from-d" id="fzyzxwt">
                        <div class="inspector-table-text">
                            <span class="table-text-s">主要咨询问题<span class="inspector-asterisk-v">*</span></span>
                            <span>：</span>
                        </div>
                        <!-- 大文本 -->
                        <div class="right-content-v">
                            <a-textarea v-if="formField.ftjzt == '0'" style="width: 100%;" v-model:value="formField.fzyzxwt" placeholder="请输入主要咨询问题" :auto-size="{ minRows: 3}"/>
                            <span v-else>{{ formField.fzyzxwt }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fzyzxwt'"><span class="tips-text-v">请输入主要咨询问题</span></div>
                    <div class="inspector-table-from-d" id="fbz">
                        <div class="inspector-table-text">
                            <span class="table-text-s">备注<span class="inspector-asterisk-v"></span></span>
                            <span>：</span>
                        </div>
                        <!-- 大文本 -->
                        <div class="right-content-v">
                            <a-textarea v-if="formField.ftjzt == '0'" style="width: 100%;" v-model:value="formField.fbz" placeholder="请输入备注" :auto-size="{ minRows: 2}"/>
                            <span v-else>{{ formField.fbz }}</span>
                        </div>
                    </div>
                    <div class="tips-flex" :key='currentIdKey' v-if="currentId == 'fbz'"><span class="tips-text-v">请输入备注</span></div>
                    <div style="border-bottom: 5px solid #f6f6f6;margin: 8px 0;"></div>
                </div>
                <div style="display: flex;justify-content: center;">
                    <a-button v-if="formField.ftjzt == '0'" class="blue-btn" style="margin-right: 10px;" @click="updataTo">暂存</a-button>
                    <a-button v-if="formField.ftjzt == '0'" class="blue-btn" @click="submitTo">提交</a-button>
                </div>
            </div>
            <div v-if="stepNum == 3">
                <a-result
                    status="success"
                    title="提交成功!"
                >
                    <template #extra>
                        <a-button style="margin-right: 10px;" class="red-btn" @click="reBackEdit">返回修改</a-button>
                        <a-button style="margin-right: 10px;" class="blue-btn" @click="reBackList">返回已申请列表</a-button>
                    </template>
                </a-result>
            </div>
            <div v-if="stepNum == 4">
                <div style="height: calc(100vh - 250px);text-align: center;">
                    <p style="color:red;font-size: 16px;">验证码有效期为10分钟，超时后请退回重新查询。</p>
                    <h2 class="stepNum-four-title">预约信息</h2>
                    <div v-if="afootList.length == 0">
                        <a-empty />
                    </div>
                    <div v-else>
                        <vxe-table
                            stripe
                            border
                            :data="afootList">
                            <vxe-column type="seq" title="#" width="50" align="center"></vxe-column>
                            <vxe-column field="fsqqymc" title="企业名称" align="center"></vxe-column>
                            <vxe-column field="fyyrq" title="预约日期" align="center"></vxe-column>
                            <vxe-column title="操作" width="90" align="center" fixed="right">
                                <template #default="{ row }">
                                    <a-button v-if="row.flczt !== '流程结束' && !row.fsfcxyy" class="orange-btn" @click="returnFuntion(row.id)" style="" >
                                        撤回
                                    </a-button>
                                    <span v-else>暂无操作</span>
                                </template>
                            </vxe-column>
                        </vxe-table>
                    </div>
                </div>
                <div style="display: flex;justify-content: center;margin-top: 30px;">
                    <a-button class="blue-btn" @click="stepNum = 2" style="width: 70%; height: 38px !important;font-size: 18px;border-radius: 5px;" >
                        新建预约
                    </a-button>
                </div>
            </div>
        </div>
        <a-modal
            title="撤回原因填写"
            :confirm-loading="confirmLoading"
            :visible="returnVisible"
            @ok="returnSjdth"
            @cancel="(returnVisible = false,returnOption = '')"
        >
            <a-textarea
                v-model="returnOption"
                placeholder="请填写撤回原因"
                :auto-size="{ minRows: 3, maxRows: 5 }"
            />
        </a-modal>
    </div>
</template>
<script>
import {
    yydjFuntion,sxyybFuntion,yyrqFuntion,updateZb,updateJb,tjNrFuntion,yzLbFuntion,thNrFuntion,fsyzmFuntion,zxyyList,sjdth
} from './service/index'
import compSelector from '@/components/compSelector/compSelector.vue'
import moment from 'moment'
import YchConstant from "@/api/YchConstant";
import validator from '@/common/validator'
import blobType from '@/common/blobType'
export default {
    components:{
        compSelector,
    },
    props:{

    },

    data(){
        return{
            windowWidth: window.innerWidth,
            emailSuffix:'qq.com',
            eSuffixList:['qq.com','163.com','126.com','gmail.com','sina.com','hotmail.com','icloud.com'],
            firstStepData:{
                fyzm: '',
                fsj:'',
                // fsqqymc:'',
            },
            YchConstant:YchConstant,
            moment:moment,
            form: this.$form.createForm(this, { name: 'fromName' }),
            rules:{
                // fsqqymc: [{
                //     required: true,
                //     message: '请输入申请企业名称',
                //     // trigger: 'blur',
                // }],
                fsj: [{
                    required: true,
                    message: '请输入手机号码',
                    // trigger: 'blur',
                },{
                    pattern: validator.isPhone.reg,
                    message: '请输入正确的手机号码',
                    // trigger: 'blur',
                }],
                code: [{
                    required: true,
                    message: '请输入验证码',
                    // trigger: 'blur',
                }]
            },
            fsfzh:'',
            formField:{},
            stepNum:this.$route.query.stepNum?this.$route.query.stepNum:null,
            djbId:this.$route.query.djbId?this.$route.query.djbId:null,
            compSelectorkey:null,
            formField:{},
            lbValue:[],
            jobResumeList:[{
                fgzkssj:'',
                fgzjssjstr:'',
                fgzdw:'',
                fzyzxwt:'',
                fzw:'',
            }],
            publishList:[{
                ffbsj:'',
                fqkmc:'',
                fwzmc:'',
            }],
            isCard:false,
            isCode:false,
            codeText:'获取验证码',
            totalSeconds:null,//总秒数
            hour:0,
            minute:0,
            second:0,
            timer: '',
            isGetCode:false,
            stepCurrent:this.$route.query.stepNum?1:0,
            lbListKey:null,
            jobResumeListKey:null,
            validateArr:[],
            validateIdData:[
                'fsqqymc','fzxlxr','fsj','fyyrq','fjhlfrs','fzyzxwt'
            ],
            currentId:'',
            currentIdKey:null,

            typeList: [],
            rqList: [],
            checkedList: [],
            indeterminate: true,
            checkAll: false,
            isTypeCheck: null,
            //验证码
            dis: false,
            show: true,
            isGrey: false, //按钮样式
            timer: null, //设置计时器,
            count: "",
            afootList: [],
            returnVisible: false,
            returnOption: '',
            confirmLoading: false,
            loading: false,
        }
    },
    watch:{

    },
    mounted(){
        if(this.$route.query.stepNum){
            this.refreshTable(this.$route.query.djbId)
            // this.stepCurrent = this.formField.ftjzt == '0'?1:2
        }else{
            this.stepCurrent = 0
        }
        window.addEventListener('resize', this.handleResize);
    },
    computed:{
        hourString () {
            return this.formatNum(this.hour)
        },
        minuteString () {
            return this.formatNum(this.minute)
        },
        secondString () {
            return this.formatNum(this.second)
        }
    },
    methods:{
        handleResize(){
            this.windowWidth = window.innerWidth;
        },
        phoneChange(){
            var isPhone = validator.isPhone.reg
            if(isPhone.test(this.firstStepData.fsj)){
                this.isCode = true
            }else{
                this.isCode = false
            }
        },
        formatNum (num) {
            return num < 10 ? '0' + num : '' + num
        },
        getYyrq(){
            yyrqFuntion().then(res => {
                //console.log(res)
                this.rqList = res.result
            })
        },
        //
        getZxyyList(){
            zxyyList({fsj: this.firstStepData.fsj,yzm: this.firstStepData.fyzm}).then(res => {
                if(res.success){
                    this.afootList = res.result
                }
            })
        },
        // 撤回
        returnFuntion(ids){
            //console.log('验证码：',this.firstStepData)
            var that = this
            that.$confirm({
                title:'您确认要撤回选中的预约申请吗？',
                onOk() {
                    that.returnId = ids
                    that.returnVisible = true
                    that.confirmLoading = false
                }
            })
        },
        returnSjdth(){
            if(this.returnOption){
                this.confirmLoading = true
                let data = {
                    id: this.returnId,
                    yzm: this.firstStepData.fyzm,
                    opinion: this.returnOption
                }
                sjdth(data).then(res => {
                    if(res.success){
                        this.$message.success('撤回成功')
                        this.getZxyyList()
                        this.returnVisible = false
                        this.returnOption = ''
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.confirmLoading = false
                })
            } else {
                this.$message.warning('请填写撤回原因！')
            }
        },
        //获取验证码
        getCode(){
            if(this.isGetCode && this.second){
              return false
            }
            this.form.validateFields(['fsj'], { force: true }, (err, values) => {
                //console.log(err)
              if (!err) {
                let loginParams = {
                    fsj:values.fsj,
                }
                //console.log(loginParams)
                this.loading = true
                fsyzmFuntion(loginParams).then(res=>{
                    if(res.code == 200){
                        this.totalSeconds = 60
                        if (this.totalSeconds > 0) {
                            this.second = this.totalSeconds
                            this.countDowm()
                        }
                        this.isGetCode = true
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.loading = false
                })
              }
            })
        },
        countDowm () {
            var self = this
            clearInterval(this.timer)
            this.timer = setInterval(function () {
            if (self.hour === 0) {
                if (self.minute === 0 && self.second === 1){
                  self.isGetCode = false
                }
                if (self.minute !== 0 && self.second === 0) {
                  self.second = 59
                  self.minute -= 1
                } else if (self.minute === 0 && self.second === 0) {
                  self.second = 0
                  // self.$emit('countDowmEnd', true)
                  clearInterval(self.timer)
                } else {
                  self.second -= 1
                }

            } else {
                if (self.minute !== 0 && self.second === 0) {
                self.second = 59
                self.minute -= 1
                } else if (self.minute === 0 && self.second === 0) {
                self.hour -= 1
                self.minute = 59
                self.second = 59
                } else {
                self.second -= 1
                }
            }
            }, 1000)
        },
        nextStep(){//下一步
            this.form.validateFields((err, values) => {
                if (!err) {
                    yydjFuntion({fsj:this.firstStepData.fsj,fyzm:this.firstStepData.fyzm}).then(res=>{
                        if(res.code == 200){
                            this.getZxyyList()
                            this.stepNum = 4

                            //console.log('下一步',res)
                            // this.stepNum = 2
                            this.validateChange(this.formField)
                            this.typeList = []
                            this.typeList = res.result.lbMapList
                            this.formField = res.result.qyReservation
                            this.$router.replace(`/consultationAppointmentTable?stepNum=`+this.stepNum+'&djbId='+res.result.qyReservation.id);
                            this.updataTo()
                            this.getYyrq()
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }
            })

        },
        // 类别勾选
        fxzztChange(e,id,type){
            //console.log(`checked = ${e.target.checked}`);
            //console.log(e,id,type)
            let data = {}
            if(type == '0'){
                data = {
                    id: id,
                    fxzzt: '1'
                }
            } else if(type == '1'){
                data = {
                    id: id,
                    fxzzt: '0'
                }
            }
            //console.log(data)
            updateJb(data).then(res => {
                if(res.code == 200){
                    this.updataTo()
                    // this.refreshTable(this.formField.id)
                }
            })
        },
        backclick(){
            var that = this
            this.$confirm({
                title:'确认要回到上一步吗？',
                onOk() {
                    that.stepNum = ''
                    that.$router.replace(`/consultationAppointmentTable`);
                    that.stepCurrent = 0
                }
            })
        },
        refreshTable(val,tips){//刷新
            sxyybFuntion({yybId:val}).then(res=>{
                if(res.code == 200){
                    //console.log('刷新',res)
                    if(res.code == 200){
                        this.validateChange(this.formField)
                        this.typeList = []
                        this.typeList = res.result.lbMapList
                        this.formField = res.result.qyReservation
                        if(tips){
                            this.$message.success('刷新成功')
                        }
                    }
                }else{
                    this.$message.warning(res.message)
                    this.stepNum = ''
                    this.$router.replace(`/consultationAppointmentTable`);
                    this.stepCurrent = 0
                }
            })
            this.getYyrq()
        },
        validateChange(val){
            // validateArr
            //validateIdData
            this.validateArr = []
            this.validateIdData.forEach(item=>{
                if(!val[item]){
                    if(!this.validateArr.filter(l=>l == item).length){
                        this.validateArr.push(item)
                    }
                }
            })
            //console.log(this.validateArr)
        },
        scrollIntoViewChange(val){
            this.currentId = val
            this.currentIdKey = Date.now()
            const tabsId = document.querySelector('#'+val);
            //console.log(tabsId.offsetTop)
            document.querySelector('#'+val).scrollIntoView({
                top: tabsId.offsetTop+200,
                block: 'start',
                behavior: "smooth"
            })
        },
        // 保存
        updataTo(val){
            let yybMap = new Map();
            yybMap.set("id", this.formField.id);
            yybMap.set("fsqqymc", this.formField.fsqqymc);
            yybMap.set("fzxlxr", this.formField.fzxlxr);
            yybMap.set("fyyrq", this.formField.fyyrq);
            yybMap.set("fjhlfrs", this.formField.fjhlfrs);
            yybMap.set("fzyzxwt", this.formField.fzyzxwt);
            yybMap.set("fbz", this.formField.fbz);
            var yybObj = {};
            yybMap.forEach(function(value, key) {
                yybObj[key] = value;
            });
            var yyb = JSON.stringify(yybObj);
            //console.log(yyb)
            updateZb(yyb).then(res => {
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.validateChange(this.formField)
                    this.refreshTable(this.formField.id)
                    if(val == '1'){
                        tjNrFuntion({yybId:this.formField.id}).then(res=>{
                            if(res.code == 200){
                                this.stepNum = '3'
                                this.refreshTable(this.formField.id)
                                this.$message.success(res.message)
                            }else{
                                this.$message.warning(res.message)
                            }
                        })
                    }
                } else{
                    this.$message.warning(res.message)
                }
            })
        },
        // 提交
        submitTo(){
            this.validateChange(this.formField)
            if(this.validateArr.length){
                this.scrollIntoViewChange(this.validateArr[0])
                //console.log(this.validateArr)
                this.$message.warning('带星号为必填内容，请填写完整。')
            }else{
                yzLbFuntion({yybId:this.formField.id}).then(res=>{
                    if(res.code == 200){
                        let that = this
                        this.$confirm({
                        title:'确认要提交吗？',
                            onOk() {
                                that.updataTo(1)
                            }
                        })
                    }else{
                        this.$message.warning('请选择咨询事项类别')
                    }
                })
            }

        },
        // 返回修改
        reBackEdit(){
            let that = this
            that.$confirm({
            title:'此操作将改变数据提交状态，您确认要返回修改已提交的数据吗？',
                onOk() {
                    thNrFuntion({yybId:that.formField.id}).then(res=>{
                        if(res.code == 200){
                            that.stepNum = '2'
                            that.refreshTable(that.formField.id)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
        },
        reBackList(){
            this.getZxyyList()
            this.stepNum = 4
        }
    }
}
</script>
<style lang="less">
.consultation-information-table-content{
    // height: calc(100vh - 40px);
    // margin: 10px 0;
    // overflow-y: auto;
    overflow: hidden;
    .ant-steps-item-title{
        font-size:18px;
    }
    .inspector-information-bottom-v{
        height: calc(100vh - 120px);
        overflow-y: auto;
        overflow-x: hidden;
    }
    .inspector-info-step-v{
        margin: 0 10px;
        .ant-steps{
            display: flex;
        }
        .ant-steps-item-active::before{
            width: 0 !important;
            height: 0 !important;
        }
        .ant-steps-item-container{
            padding-bottom: 0;
        }
        .ant-steps-item::after{
            top: -9px;
            left: 90%;
            transform: rotate(45deg);
        }
        .ant-steps-item-icon {
            float: left;
            margin-right: 8px;
        }
        .ant-steps-item-content{
            min-height: 30px;
        }
    }
    .inspector-registration-first-step{
        margin: 10px 0;
        margin-top: 50px;
    }
    .inspector-table-from-d{
        margin:10px;
        display: flex;
        align-items: center;
        .inspector-asterisk-v{
            color:#f5222d;
            font-size: 24px;
            display: flex;
            width: 6px;
            height: 16px;
            line-height: 21px;
        }
        .inspector-table-text{
            display: flex;
            align-items: center;
            .table-text-s{
                font-weight: 600;
                text-align: right;
                display: flex;
                justify-content: flex-end;
                width: 120px;
                font-size:18px;
                .inspector-asterisk-v{
                    padding-right: 10px;
                    line-height:27px;
                }
                .first-asterisk-v{
                    line-height: 50px;
                }
            }
        }

        .left-text-v{

        }
        .right-content-f{
            flex: 1;
            font-size:18px;
            input {
              background: #fff;
              font-size: 26px;
            }
            .ant-input:focus {
              box-shadow: none;
            }
            .inspector-table-code-btn-box{
                height: 32px !important;
                width: 110px;
            }
            .typeCheck-div {

                // margin-bottom: 10px;
                line-height: 1.8;
            }
            .ant-form {
              .ant-row {
                margin-bottom: 0 !important;
                margin-top: 20px;
                // /deep/ input:-webkit-autofill {
                //   -webkit-box-shadow: 0 0 0 0px transparent inset !important;
                //   background-color: transparent !important;
                // }
                // input:-internal-autofill-previewed,
                // input:-internal-autofill-selected {
                //   // -webkit-text-fill-color: #FFFFFF !important;
                //   outline: none;
                //   transition: background-color 5000s ease-in-out 0s !important;
                //   background-color: transparent !important;
                // }
                // /deep/ input:-internal-autofill-selected {
                //     transition: background-color 5000s ease-in-out 0s !important;
                //     background-color: transparent !important;
                // }
              }
            }
        }
        .right-content-v{
            flex: 1;
            font-size:18px;
            .inspector-table-code-btn-box{
                height: 32px;
                width: 88px;
            }
            .typeCheck-div {

                // margin-bottom: 10px;
                line-height: 1.8;
            }
        }
        .email-suffix-v{
            display: flex;
            align-items: center;
        }


    }
    .table-from-d-car{
        align-items: flex-start;
        .table-text-car{
            height: 40px;
            line-height: 40px;
        }
    }

    .itable-large-area{
        margin: 10px;
        .text-xfl{
            font-weight: 600;
            display: flex;
            .inspector-asterisk-v{
                color:#f5222d;
                padding-right: 15px;
                font-size: 24px;
                display: flex;
                width: 6px;
                height: 16px;
                line-height: 29px;
            }
        }
        .itable-content-v{
            margin: 0 10px;
            font-size:18px;
            .ant-checkbox-wrapper{
                font-size:18px;
            }
            .ant-checkbox-disabled + span {
                color: rgba(0, 0, 0, 0.65);
            }
        }
    }

    .inspector-registration-second-step{
        margin: 10px 0;
        .tips-flex{
            display: flex;
            padding-left: 96px;
            padding-bottom: 5px;
            .tips-text-v{
                color: #f5222d;
            }
        }
    }
    .ant-input-disabled{
        background: #fff;
        color: rgba(0, 0, 0, 0.65);
    }
    .lb-list-checkbox{
        display: flex;
        align-items: flex-start;
        .ant-checkbox{
            margin-top: 7px;
        }
        .lb-type-list-v{
            .ant-checkbox{
                margin-top: 0px;
            }
        }
    }
    .a-select-option{
        font-size:18px
    }
    .ant-checkbox-wrapper + .ant-checkbox-wrapper {
        margin-left: 0;
    }
    .blue-btn{
        border: 1px solid #5ca3e5 !important;
        background-color: #5ca3e5 !important;
        color: #fff !important;
    }
    .code-text{
        display: inline-block;
        // width: 112px;
    }

    .code-btn-box:hover, .code-btn-box:focus{
        color: rgba(0, 0, 0, 1) !important;
        border-color: #d9d9d9 !important;
    }
    .text-color{
        color: #597ef7 !important;
    }
    .stepNum-four-title {
        width: 70%;
        margin: 0.5em auto;
        text-align: center;
        font-family: '宋体' !important;
        font-weight: bold;
        margin-top: 0.5em;
        color: #5ca3e5;
        // border: 1px solid #e4e3e3;
        background-color: #e6f7ff;
        border-radius: 50px;
        padding: 5px;
    }
}

</style>
